/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pl.tom.social.dal.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Tom
 */
@Embeddable
public class SiteSiteLinkPK implements Serializable {
	@Basic(optional = false)
    @Column(name = "site_id")
	private int siteId;
	@Basic(optional = false)
    @Column(name = "siteLink_id")
	private int siteLinkId;

	public SiteSiteLinkPK() {
	}

	public SiteSiteLinkPK(int siteId, int siteLinkId) {
		this.siteId = siteId;
		this.siteLinkId = siteLinkId;
	}

	public int getSiteId() {
		return siteId;
	}

	public void setSiteId(int siteId) {
		this.siteId = siteId;
	}

	public int getSiteLinkId() {
		return siteLinkId;
	}

	public void setSiteLinkId(int siteLinkId) {
		this.siteLinkId = siteLinkId;
	}

	@Override
	public int hashCode() {
		int hash = 0;
		hash += (int) siteId;
		hash += (int) siteLinkId;
		return hash;
	}

	@Override
	public boolean equals(Object object) {
		// TODO: Warning - this method won't work in the case the id fields are not set
		if (!(object instanceof SiteSiteLinkPK)) {
			return false;
		}
		SiteSiteLinkPK other = (SiteSiteLinkPK) object;
		if (this.siteId != other.siteId) {
			return false;
		}
		if (this.siteLinkId != other.siteLinkId) {
			return false;
		}
		return true;
	}

	@Override
	public String toString() {
		return "pl.tom.social.dal.entity.SiteSiteLinkPK[siteId=" + siteId + ", siteLinkid=" + siteLinkId + "]";
	}

}
